<?

require_once ("application.list.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;

$indexes = array (
	title=>array (label=>"Title",order=>"DEFAULT",wrapper=>"vmc_icon_module"),
	details=>array (label=>"Details",order=>"DEFAULT"),
	code=>array (label=>"Code",order=>"DEFAULT",wrapper=>"vmc_icon_code"),
	access=>array (label=>"Access",order=>"DEFAULT",
			values=>array (
				"public"=>"Public",
				"private"=>"Private",
				"exclusive"=>"Exclusive",
			)),
	cdate=>array (label=>"Create Date",order=>"DEFAULT",wrapper=>"vmc_icon_date"),
);

$object_ctl = "/admin/accounts/users/fs_users.php?fs_action=view&fs_tab=roles&fs_tab_option=fs_roles&fs_tab_modules=main&fs_action_modules=view&user_id={$_REQUEST["user_id"]}&role_id={$_REQUEST["role_id"]}&";
$link_options = "&fs_action=view&fs_tab=roles&fs_tab_option=fs_roles&user_id={$_REQUEST["user_id"]}&role_id={$_REQUEST["role_id"]}";
$list_options = array (
	array (
		label=>"Modify A Role Module",
		link=>"fs_users.php?fs_action=view&fs_tab=roles&fs_tab_option=fs_roles&fs_tab_modules=main&fs_action_modules=addnew&user_id={$_REQUEST["user_id"]}&role_id={$_REQUEST["role_id"]}"
	),
);

$_OBJECT_IFACE_LIST = _app_create_list_object (array (
                db_conn=>$_GLOBAL_DBH,
                indexes=>$indexes,
		list_count=>"SELECT COUNT(*) FROM user_role_modules_view WHERE role_id={$_REQUEST["role_id"]}",
		list_select=>"SELECT * FROM user_role_modules_view WHERE role_id={$_REQUEST["role_id"]}",
                list_id=>"lc_user_role_modules",
                list_options=>$list_options,
                primary_key=>"id",
                primary_relation=>"role_module_id",
                link_options=>$link_options,
                object_ctl=>$object_ctl
));

$_OBJECT_IFACE_TABBING_PANEL->insert_container ($_OBJECT_IFACE_LIST);

?>
